bf15d11874f3fdc74e5b9120c58930ab5803c37f,camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameProcessStrategy.java,GenericFileRenameProcessStrategy,rollback,#GenericFileOperations#GenericFileEndpoint#Exchange#GenericFile#,55

Before Change



        if (failureRenamer != null) {
            GenericFile<T> newName = failureRenamer.renameFile(exchange, file);
            renameFile(operations, file, newName);
        }
    }

After Change



        if (failureRenamer != null) {
            // create a copy and bind the file to the exchange to be used by the renamer to evaluate the file name
            Exchange copy = exchange.copy();
            file.bindToExchange(copy);
            // must preserve message id
            copy.getIn().setMessageId(exchange.getIn().getMessageId());
            copy.setExchangeId(exchange.getExchangeId());

            GenericFile<T> newName = failureRenamer.renameFile(copy, file);
            renameFile(operations, file, newName);
        }
    }